Key space (cryptography)

In cryptography, an algorithm's key space refers to the set of all possible keys that can be used to initialize it.[1][2] For example, if an algorithm works using a key that is a string of 10 bits, then its key space is the set of all binary strings of length 10. i.e. we have key space of size 210 = 1024.

To avoid adversaries from guessing the key using a brute-force attack, the key space is usually designed to be extremely large. Another desirable attribute is that the key space be flat, having no or very few weak keys. In most cases, it suffices to search 50% of the key space to find the solution.[3]

Examples

The block cipher Rijndael/AES uses a key of up to 256 bits, resulting in a key space containing over 2256 (or 1.1579 × 1077) keys. This makes it computationally unfeasible to check each possible key by brute force.

In the DES block cipher, a 56-bit key is used, resulting in a relatively small key space of size 256 (or 7.2058 x 1016).

The ROT13 cipher is only intended to prevent people from accidentally reading messages (e.g. movie plot details). As there is no key, the key space is therefore empty.

References

  1. ^ "CISSP Exam Preparation". http://www.flashcardmachine.com/: Flashcard machine. http://www.flashcardmachine.com/cissp-exam-preparation.html. Retrieved 2010-03-11. "All possible values that can be set to generate a key." 
  2. ^ "Q: What is a "keyspace"?". http://www.experts123.com/: experts123. http://www.experts123.com/q/what-is-a-keyspace.html. Retrieved 2011-03-11. "A "keyspace" is the theoretical set of all possible permutations of a key, given a set key size. For example, if a key were two bits long, the keyspace would consist of four keys..." 
  3. ^ "Q: Why do the statistics measure estimate time to having 50% of the keyspace searched?". http://www.experts123.com/: experts123. http://www.experts123.com/q/why-do-the-statistics-measure-estimate-time-to-having-50-of-the-keyspace-searched.html. Retrieved 2011-03-11. "Question: Why do the statistics measure estimate time to having 50% of the keyspace searched? Answer: Because we don't know where in the keyspace of 72,000,000,000,000,000 the right answer is. On the average, only 50% of the keyspace needs to be searched before a solution is found."